package domain;

import javax.persistence.Enumerated;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Min;

/**
 *
 * @author yuyok
 */
//@Embeddable
public class AccountInfo {

    @Enumerated
    private CardType cardType;
    @Digits(integer = 16, fraction = 0)
    private Integer cardNumber;
    @Digits(integer = 3, fraction = 0)
    private Integer cardSecurityCode;
    @Min(value = 0)
    private Integer balance;

    public AccountInfo() {
    }

    public AccountInfo(CardType cardType, Integer cardNumber, Integer cardSecurityCode) {
        this.cardType = cardType;
        this.cardNumber = cardNumber;
        this.cardSecurityCode = cardSecurityCode;
    }

    public CardType getCardType() {
        return cardType;
    }

    public void setCardType(CardType cardType) {
        this.cardType = cardType;
    }

    public Integer getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(Integer cardNumber) {
        this.cardNumber = cardNumber;
    }

    public Integer getCardSecurityCode() {
        return cardSecurityCode;
    }

    public void setCardSecurityCode(Integer cardSecurityCode) {
        this.cardSecurityCode = cardSecurityCode;
    }

    public Integer getBalance() {
        return balance;
    }

    public void setBalance(Integer balance) {
        this.balance = balance;
    }
}
